package com.huixi.service.impl;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Service;

import com.huixi.entity.User;
import com.huixi.service.LoginService;
import com.huixi.utils.JsonResult;

@Service
public class LoginServiceImpl implements LoginService {

	@Override
	public JsonResult getUserBySession(HttpSession session) {
		User userInfo = (User) session.getAttribute("userInfo");
		session.setMaxInactiveInterval(3*60);
		return JsonResult.ok(userInfo);
	}

}
